using System;
using System.Collections.Generic;
using System.Linq;
using MvcMall.Core.Contacts.Repositories;
using MvcMall.Core.Domains;
using NHibernate.Linq;

namespace MvcMall.Data.Repositories
{
    public class AdminMenuRepository : DataRepository<AdminMenu>, IAdminMenuRepository
    {
        public List<AdminMenu> GetByIds(List<int> editMenus)
        {
            if (editMenus == null || editMenus.Count == 0)
                return null;
            return Session.Query<AdminMenu>()
                .Where(m => editMenus.Contains(m.Id))
                .ToList();
        }
    }
}